package com.junzhiit.nengji.cms.web.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.junzhiit.nengji.cms.service.BalanceHistoryService;
import com.junzhiit.nengji.cms.web.vo.BalanceHistoryVO;
import com.junzhiit.nengji.cms.web.vo.DataTablesParamVO;
import com.junzhiit.nengji.cms.web.vo.ResultVO;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/balance")
public class BalanceHistoryController {

	@Autowired
	private BalanceHistoryService balanceHistoryService;
	
	@ApiOperation(value = "查找所有余额变动记录")
	@RequestMapping(method = RequestMethod.GET)
	public Map<String, Object> findAll(DataTablesParamVO dtp,BalanceHistoryVO balanceHistoryVO) {
		return balanceHistoryService.findAll(dtp, balanceHistoryVO);
	}
	
	@ApiOperation(value = "查找该店铺下的储值统计信息")
	@RequestMapping(value="/data", method = RequestMethod.GET)
	public ResultVO findHeaderData(String sessionId) {
		return balanceHistoryService.findHeaderData(sessionId);
	}
}
